import {getDictByDictCodeArr} from "@/api/modules/common-api.js"
import localDictCodes from "@/assets/data/dict.js"
export default {
  getDictCodeApi: getDictByDictCodeArr, //必传 获取字典数据接口
  localDictCodes, //选填 项目写死的字典数据
  format: {
    label: "dictLabel",
    value: "dictValue",
    disabled: "disabled"
  },
  query: "type",
  formatterDictList: (data, query) => {
    return data.dictObj
  },
  formatterDictVersion: (data) => {
    return data.dictVersion
  },
  disabledDataFun: (item) => {
  // 默认为 return false  全部可选
  // 字典项中 dictDisabled 值为字符串 1的 将禁止被选择
    return item.dictDisabled === "1"
  },
  dictDataKey: "vue2-element-admin-dict-data",
  versionKey: "vue2-element-admin-dict-version",
  treeSetting: {
    firstId: null,
    idField: "dictItemId",
    labelField: "dictLabel",
    parentIdField: "parentDictItemId"
  }
}